package com.ltf.order.feign;

import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @Auther: liutf
 * @Date: 2025/3/26
 * @Description: com.ltf.order.feign
 * @version: 1.0
 */

@FeignClient(value = "weather-client",url="https://route.showapi.com")
public interface WeatherFeignClient {

    @PostMapping(value="/9-2",consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    JSONObject getWeather(@RequestParam("appKey") String appKey,
                          @RequestParam("area") String area);
}
